﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LPF.Lib.UI
{
    public partial class ProgressBarUc : UserControl
    {
        ProgressBarEx progressBar;

        public ProgressBarUc()
        {
            InitializeComponent();

           // this.Controls.Remove(progressBar);
            progressBar = new ProgressBarEx();
            progressBar.Dock = DockStyle.Fill;
            Controls.Add(progressBar);
        }

        public void UpdateStatus(int value)
        {
            try
            {
                BeginInvoke(new Action(() => progressBar.Value = value));
            }
            catch (Exception)
            {
                
                throw;
            }
        }
    }
}
